package com.adopapa.nezhacloud.authc.controller;

import org.apache.commons.lang3.exception.ExceptionUtils;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import com.adopapa.nezhacloud.common.RestResponse;
import com.adopapa.nezhacloud.ddd.controller.BaseController;

@RestControllerAdvice
public class ErrorController extends BaseController {

	@ExceptionHandler
	public RestResponse error(Exception e) {
		logger.info(ExceptionUtils.getStackTrace(e));
		return RestResponse.error(e);
	}
	
	
}
